function post() {
    let user = {
        "userName": "userName_new",
        "sexId": 1,
        "note": "note_new"
    };
    axios({
        method: "POST",
        url: "./users/insert",
        data: JSON.stringify(user),
        headers:{
            "Content-Type": "application/json;charset=UTF-8"
        }
    }).then(resp => {
        let result = resp.data;
        if (result.success) {
            alert("插入成功，数据：" + JSON.stringify(result.data));
            return;
        } else {
            alert("插入成功，后台消息：" + result.message);
        }
    })
}

function get() {
    axios({
        method: "GET",
        url: "./users/1",
    }).then(resp => {
       let result = resp.data;
       if (result != null && result.success) {
           let user = result.data;
           alert("查询成功，数据：" + JSON.stringify(user));
       } else {
           alert("获取数据失败");
       }
    })
}